/*
 * @(#) MaterialSplitMethod.java 2013-7-25 下午7:11:01
 *
 * Copyright 2013 Rockwell Automation, Inc. All rights reserved.
 * Rockwell Automation PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */package com.osi.mes.pm.object;

import java.util.Vector;

import com.datasweep.compatibility.client.DependentATRow;
import com.datasweep.compatibility.client.ParentATRow;
import com.osi.mes.constants.IATConstants;

 /**
  * 原料拆分方法，对应表PMMatSplitMethod
  * @author Nemo, 2013-7-25 下午7:11:07
  */
public class MaterialSplitMethod
{
	public MaterialSplitMethod(ParentATRow parentATRow)
	{
		this.partNumber = (String) parentATRow.getValue(IATConstants.AT_COLUMN_PM_MATERIAL_SPLIT_METHOD_DEST_PARTNUMBER);
		this.splitMethod = (String) parentATRow.getValue(IATConstants.AT_COLUMN_PM_MATERIAL_SPLIT_METHOD_SPLIT_METHOD);
		Vector dependentAtRows = parentATRow.getDependentATRows();
		for (int i = 0; i < dependentAtRows.size(); i++)
		{
			DependentATRow dependentAtRow = (DependentATRow) dependentAtRows.get(i);
			this.sourcePartNumber.add((String) dependentAtRow.getValue(IATConstants.AT_COLUMN_PM_MATERIAL_SPLIT_METHOD_MATERIALS_SOURCE_PARTNUMBER));
		}
	}
	
	String partNumber;
	String splitMethod;
	Vector<String> sourcePartNumber = new Vector<String>();
	
	public String getPartNumber()
	{
		return partNumber;
	}
	public void setPartNumber(String partNumber)
	{
		this.partNumber = partNumber;
	}
	public Vector<String> getSourcePartNumber()
	{
		return sourcePartNumber;
	}
	public void setSourcePartNumber(Vector<String> sourcePartNumber)
	{
		this.sourcePartNumber = sourcePartNumber;
	}
	public String getSplitMethod()
	{
		return splitMethod;
	}
	public void setSplitMethod(String splitMethod)
	{
		this.splitMethod = splitMethod;
	}
}
